<!--
 * @Author: Rachel 943701297@qq.com
 * @Date: 2022-07-23 19:32:15
 * @LastEditors: Rachel 943701297@qq.com
 * @LastEditTime: 2022-07-25 21:03:20
 * @FilePath: \Vue_Codec:\Users\94370\Desktop\面向工作学习\笔记\learning-notes\html_css_Code\11-移动Web开发\1-flex.html
 * @Description: 
 * 
 * Copyright (c) 2022 by Rachel 943701297@qq.com, All Rights Reserved. 
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>flex布局——圣杯布局</title>
    <style>
      * {
        padding: 0;
        margin: 0;
        box-sizing: border-box;
      }
      .box {
        display: flex;
        width: 60%;
        height: 150px;
        margin: 0 auto;
        background-color: gray;
      }
      .inner:nth-child(1) {
        width: 100px;
        height: 150px;
        background-color: blue;
      }
      .inner:nth-child(2) {
        flex: 1;
        background-color: green;
      }
      .inner:nth-child(3) {
        width: 100px;
        height: 150px;
        background-color: purple;
      }
      p {
        display: flex;
        width: 60%;
        height: 150px;
        margin: 100px auto;
        background-color: pink;
      }
      p span {
        flex: 1;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="inner">1</div>
      <div class="inner">2</div>
      <div class="inner">3</div>
    </div>
    <p>
      <span>1</span>
      <span>2</span>
      <span>3</span>
    </p>
  </body>
</html>
